<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jQuery.js"></script>
    <style>
        div{
            width: 300px;
            height: 300px;
            background-color: skyblue;
        }
    </style>
</head>
<body>
    <button>下拉滑动</button>
    <button>上拉滑动</button>
    <button>切换滑动</button>
    <div></div>
    <script>
        $(function(){
            //1.下拉滑动 slideDown
            $("button").eq(0).click(function(){
                $("div").slideDown('slow')
            })
            //2.上拉滑动 slideUp
            $("button").eq(1).click(function(){
                $("div").slideUp("slow")
            })
            //3.切换滑动 slideToggle
            $("button").eq(2).click(function(){
                $("div").slideToggle()
            })
        })
    </script>
</body>
</html>